cmake_minimum_required(VERSION 3.20)

project(DataStruct VERSION 1.0)

# 限制构建类型为 Debug 和 Release
set(CMAKE_CONFIGURATION_TYPES "Debug;Release")

# 设置C++标准
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 定义根目录
set(SRC_ROOT_DIR ${CMAKE_SOURCE_DIR})
set(OUT_ROOT_DIR ${CMAKE_BINARY_DIR})
set(3RD_ROOT_DIR ${CMAKE_SOURCE_DIR}/3rd/)

# 折叠 ZERO_CHECK 等
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(PREDEFINED_TARGETS_FOLDER "CustomTargets") # 折叠到默认目录

set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )

add_subdirectory(app)
add_subdirectory(STL)
add_subdirectory(services)
